package com.itheima.pattern.factory.factory_method;

public class CoffeeStore {
    private CoffeeFactory factory;

    public void setFactory(CoffeeFactory factory) {
        this.factory = factory;
    }
    public Coffee orderCoffee() {
        Coffee createcoffee = factory.createcoffee();
        createcoffee.addmilk();
        createcoffee.addsugar();
        return createcoffee;
    }

}
